package com.ejuornal.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.ejuornal.bean.AticalEditor;
import com.ejuornal.dao.AticalEditorDao;
import com.ejuornal.service.AticalEditorService;

@Component("aticalEditorServiceImpl")
public class AticalEditorServiceImpl implements AticalEditorService {
	private AticalEditorDao aticalEditorDao;
	

	public AticalEditorDao getAticalEditorDao() {
		return aticalEditorDao;
	}
	@Resource(name="aticalEditorDaoImpl")
	public void setAticalEditorDao(AticalEditorDao aticalEditorDao) {
		this.aticalEditorDao = aticalEditorDao;
	}

	@Override
	public void addAticalEditor(AticalEditor aticalEditor) {
		// TODO Auto-generated method stub
		String sql = "insert into t_article_editor (userId,articalId,createDate) values(?,?,?)";
		
		aticalEditorDao.add(sql, new Object[]{
				aticalEditor.getUserId(),
				aticalEditor.getArticalId(),
				aticalEditor.getCreateDate()
		});

	}

	@Override
	public AticalEditor findAticalEditor(int articalId) {
		// TODO Auto-generated method stub
		return null;
	}

}
